package com.ticket.common.core.domain.entity;

import com.ticket.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.data.annotation.Transient;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.List;

/**
 * 部门表 sys_dept
 * 
 */
@ApiModel(description = "部门实体")
public class SysDept extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 部门ID */
    @ApiModelProperty(value = "部门ID")
    private Long deptId;

    /** 父部门ID */
    @ApiModelProperty(value = "父部门ID")
    private Long parentId;

    /** 祖级列表 */
    @ApiModelProperty(value = "祖级列表")
    private String ancestors;

    /** 部门名称 */
    @ApiModelProperty(value = "部门名称")
    private String deptName;

    /** 显示顺序 */
    @ApiModelProperty(value = "显示顺序")
    private Integer orderNum;

    /** 负责人 */
    @ApiModelProperty(value = "负责人")
    private String leader;

    /** 联系电话 */
    @ApiModelProperty(value = "联系电话")
    private String phone;

    /** 邮箱 */
    @ApiModelProperty(value = "邮箱")
    private String email;

    /** 部门状态:0正常,1停用 */
    @ApiModelProperty(value = "部门状态:0正常,1停用")
    private String status;

    /** 删除标志（0代表存在 2代表删除） */
    @ApiModelProperty(value = "删除标志（0代表存在 2代表删除）")
    private String delFlag;

    /** 父部门名称 */
    @ApiModelProperty(value = "父部门名称")
    private String parentName;

    @ApiModelProperty(value = "0:部门;1:剧院")
    private Integer deptType;

    @ApiModelProperty(value = "1:省;2:市;3:区")
    private Integer operaLevel;

    @ApiModelProperty(value = "剧院地址")
    private String operaAddress;

    @ApiModelProperty(value = "剧院logo")
    private String operaLogo;

    /** 子部门 */
    @Transient
    @ApiModelProperty(value = "子部门")
    private List<SysDept> children = new ArrayList<SysDept>();

    @ApiModelProperty(value = "新增部门时 需要传入剧院id")
    private Long operaId;

    @ApiModelProperty(value = "剧院介绍")
    private String operaDetail;

    @ApiModelProperty(value = "剧院海报")
    private String operaPosters;
    @ApiModelProperty(value = "维度")
    private String lat;
    @ApiModelProperty(value = "经度")
    private String lng;

    @Transient
    @ApiModelProperty(value = "管理员账号,剧院新增时传参")
    private String loginName;

    @Transient
    @ApiModelProperty(value = "管理员密码,剧院新增时传参")
    private String passWord;

    @Transient
    @ApiModelProperty(value = "小程序剧院详情内的演出详细数据")
    private String performs;
    @Transient
    @ApiModelProperty(value = "小程序剧院详情内的演出数量")
    private Integer perFormNum;

    @ApiModelProperty(value = "是否展示在剧院模块 0 不展示 1 展示")
    private Integer isShow;

    public Integer getIsShow() {
        return isShow;
    }

    public void setIsShow(Integer isShow) {
        this.isShow = isShow;
    }

    public Long getDeptId()
    {
        return deptId;
    }

    public void setDeptId(Long deptId)
    {
        this.deptId = deptId;
    }

    public Long getParentId()
    {
        return parentId;
    }

    public void setParentId(Long parentId)
    {
        this.parentId = parentId;
    }

    public String getAncestors()
    {
        return ancestors;
    }

    public void setAncestors(String ancestors)
    {
        this.ancestors = ancestors;
    }

    @NotBlank(message = "部门名称不能为空")
    @Size(min = 0, max = 30, message = "部门名称长度不能超过30个字符")
    public String getDeptName()
    {
        return deptName;
    }

    public void setDeptName(String deptName)
    {
        this.deptName = deptName;
    }

    @NotNull(message = "显示顺序不能为空")
    public Integer getOrderNum()
    {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum)
    {
        this.orderNum = orderNum;
    }

    public String getLeader()
    {
        return leader;
    }

    public void setLeader(String leader)
    {
        this.leader = leader;
    }

    @Size(min = 0, max = 20, message = "联系电话长度不能超过20个字符")
    public String getPhone()
    {
        return phone;
    }

    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    @Email(message = "邮箱格式不正确")
    @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
    public String getEmail()
    {
        return email;
    }

    public void setEmail(String email)
    {
        this.email = email;
    }

    public String getStatus()
    {
        return status;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getParentName()
    {
        return parentName;
    }

    public void setParentName(String parentName)
    {
        this.parentName = parentName;
    }

    public List<SysDept> getChildren()
    {
        return children;
    }

    public void setChildren(List<SysDept> children)
    {
        this.children = children;
    }

    @NotNull(message = "部门类型不能为空")
    public Integer getDeptType() {
        return deptType;
    }

    public void setDeptType(Integer deptType) {
        this.deptType = deptType;
    }

    public Integer getOperaLevel() {
        return operaLevel;
    }

    public void setOperaLevel(Integer operaLevel) {
        this.operaLevel = operaLevel;
    }

    public String getOperaAddress() {
        return operaAddress;
    }

    public void setOperaAddress(String operaAddress) {
        this.operaAddress = operaAddress;
    }

    public String getOperaLogo() {
        return operaLogo;
    }

    public void setOperaLogo(String operaLogo) {
        this.operaLogo = operaLogo;

    }

    public Long getOperaId() {
        return operaId;
    }

    public void setOperaId(Long operaId) {
        this.operaId = operaId;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getPassWord() {
        return passWord;
    }

    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    public String getOperaDetail() {
        return operaDetail;
    }

    public void setOperaDetail(String operaDetail) {
        this.operaDetail = operaDetail;
    }

    public String getOperaPosters() {
        return operaPosters;
    }

    public void setOperaPosters(String operaPosters) {
        this.operaPosters = operaPosters;
    }

    public String getPerforms() {
        return performs;
    }

    public void setPerforms(String performs) {
        this.performs = performs;
    }

    public Integer getPerFormNum() {
        return perFormNum;
    }

    public void setPerFormNum(Integer perFormNum) {
        this.perFormNum = perFormNum;
    }

    public String getLat() {
        return lat;
    }

    public void setLat(String lat) {
        this.lat = lat;
    }

    public String getLng() {
        return lng;
    }

    public void setLng(String lng) {
        this.lng = lng;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("deptId", getDeptId())
            .append("parentId", getParentId())
            .append("ancestors", getAncestors())
            .append("deptName", getDeptName())
            .append("orderNum", getOrderNum())
            .append("leader", getLeader())
            .append("phone", getPhone())
            .append("email", getEmail())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
